<template>
  <svg class="icon" aria-hidden="true" :font-size=size>
    <use  :xlink:href="iconName" :fill="color" ></use>
  </svg>
</template>
<script>
export default {
  name: "svgIcon",
  data(){
    return{
      prefix:"icon-"
    }
  },
  props:{
    color: {
      type: String,
    },
    name:{
      type: String,
      default:"add"
    },
    size:{
      type:Number,
      default: 16
    }
  },
  computed: {
    iconName () {
     return `#${this.prefix}${this.name}`
    }
  }
}
</script>

<style scoped>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
